package deco
//崇尚自由的选项模式
type User struct {
	Id   int
	Name string
	Price float64
}
type UserGetinfo func(int) *User

//业务函数
func Getinfo(id int) *User {
	return &User{Id: id, Name: "huyanzu"}
}

//装饰函数
func GetInfoWith(f UserGetinfo) UserGetinfo {
	return func(i int) *User {
		return f (i)
	}
}
